<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>赋值运算符</title>
</head>

<body>
  <script>
    // 赋值运算符
    // 1. = 把右边的赋值给左边的, 要求左边的必须是一个容器(变量/常量)
    // let age = 10
    // const pi = 100

    // let num1 = 10
    // let num2 = num1

    // 2. 其它的赋值运算符
    // += -= *= /= %=

    // let num = 10
    // num = num + 1
    // console.log(num)

    // 简洁写法
    let num = 10
    num += 100  // num = num + 100
    console.log(num)

  </script>
</body>

</html>